<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>优田儿童成长中心</title>
    <link href="/static/assets/fontAwesome/css/fontawesome-all.min.css" rel="stylesheet">
    <link href="/static/assets/css/lib/themify-icons.css" rel="stylesheet">
    <link href="/static/assets/css/lib/mmc-chat.css" rel="stylesheet"/>
    <link href="/static/assets/css/lib/sidebar.css" rel="stylesheet">
    <link href="/static/assets/css/lib/bootstrap.min.css" rel="stylesheet">
    <link href="/static/assets/css/lib/nixon.css" rel="stylesheet">
    <link href="/static/assets/lib/lobipanel/css/lobipanel.min.css" rel="stylesheet">
    <link href="/static/assets/css/style.css" rel="stylesheet">
    <link href="/static/css/datetime.css" rel="stylesheet">
</head>
<body>
<div class="sidebar sidebar-hide-to-small sidebar-shrink sidebar-gestures">
    <div class="nano">
        <div class="nano-content">
            <ul>
                <li>
                    <a href="/home/"><i class="ti-bar-chart"></i> 统计数据</a>
                </li>
                <li class="active">
                    <a href="/teacher/"><i class="ti-user"></i> 教师管理<span
                            class="sidebar-collapse-icon ti-angle-right"></span></a>
                </li>
                <li>
                    <a href="/child/"><i class="ti-user"></i> 幼儿管理</a>
                </li>
                <li>
                    <a href="/posts/"><i class="ti-desktop"></i> 岗位管理</a>
                </li>
            </ul>
        </div>
    </div>
</div>
<div class="header">
    <div class="pull-left">
        <div class="logo">
            <a>
                <img id="logoImg" src="/static/img/yt1.png" data-logo_big="/static/img/yt1.png"
                     data-logo_small="/static/img/yt3.png" alt="Nixon"/>
            </a>
        </div>
        <div class="hamburger sidebar-toggle">
            <span class="ti-menu"></span>
        </div>
    </div>
    <div class="pull-right p-r-15">
        <ul>
            <li class="header-icon dib">
                <img class="avatar-img" src="/static/assets/images/avatar/1.jpg" alt=""/> <span
                    class="user-avatar"><span th:text="${session.username}"></span>&nbsp;&nbsp;&nbsp;<i
                    class="ti-angle-down f-s-10"></i></span>
                <div class="drop-down dropdown-profile">
                    <div class="dropdown-content-body">
                        <ul>
                            <li><a href="/exit/"><i class="ti-power-off"></i> <span>注销</span></a></li>
                        </ul>
                    </div>
                </div>
            </li>
        </ul>
    </div>
</div>
<div class="content-wrap">
    <div class="main">
        <div class="container-fluid">
            <div class="row">
                <div class="col-lg-8 p-0">
                    <div class="page-header">
                        <div class="page-title">
                            <h1>教师管理</h1>
                        </div>
                    </div>
                </div>
                <div class="col-lg-4 p-0">
                    <div class="page-header">
                        <div class="page-title">
                            <ol class="breadcrumb text-right">
                                <a href="javascript:history.back()" class="btn-link" style="font-size: 16px;" id="back">
                                    <span class="glyphicon glyphicon-triangle-left" aria-hidden="true"></span>返回
                                </a>
                            </ol>
                        </div>
                    </div>
                </div>
            </div>
            <div class="main-content">
                <div class="row">
                    <div class="card alert">
                        <div class="card-header">
                            <h4>添加【<span th:text="${t.tname}">教师姓名</span>】教师工资</h4>
                            <div class="card-header-right-icon">
                            </div>
                        </div>
                        <div class="card-body">
                            <div class="basic-elements">
                                <form id="addSalForm">
                                    <input type="hidden" name="tid" th:value="${t.tid}">
                                    <div class="row">
                                        <div class="col-lg-6">
                                            <div class="form-group">
                                                <label class="badge badge-dark">工资月份</label>
                                                <input id="datetimepicker" name="month"
                                                       class="form-control input-text datetimepicker-input" type="text"
                                                       placeholder="请选择工资月份" readonly>
                                            </div>
                                            <h5 class="badge badge-primary">基本工资部分</h5>
                                            <div class="form-group">
                                                <label>底薪</label>
                                                <input class="form-control" type="text" placeholder="请输入教师底薪"
                                                       value="0" name="base_sal" required>
                                            </div>
                                            <div class="form-group">
                                                <label>补助</label>
                                                <input class="form-control" type="text" placeholder="请输入教师补助"
                                                       value="0" name="subsidy" required>
                                            </div>
                                            <div class="form-group">
                                                <label>班额</label>
                                                <input class="form-control" type="text" placeholder="请输入教师班级额"
                                                       value="0" name="class_size" required>
                                            </div>
                                            <div class="form-group">
                                                <label>卫生</label>
                                                <input class="form-control" type="text" placeholder="请输入卫生数据"
                                                       value="0" name="health" required>
                                            </div>
                                            <div class="form-group">
                                                <label>工龄</label>
                                                <input class="form-control" type="text" placeholder="请输入教师工龄数据"
                                                       value="0" name="year" required>
                                            </div>
                                            <div class="form-group">
                                                <label>学历</label>
                                                <input class="form-control" type="text" placeholder="请输入教师学历"
                                                       value="0" name="edu" required>
                                            </div>
                                            <h5 class="badge badge-warning">绩效工资部分</h5>
                                            <div class="form-group">
                                                <label>绩效1</label>
                                                <input class="form-control" type="text" value="0"
                                                       placeholder="请输入教师绩效" name="merits_sal1" required>
                                            </div>
                                            <div class="form-group">
                                                <label>绩效2</label>
                                                <input class="form-control" type="text" value="0"
                                                       placeholder="请输入教师绩效" name="merits_sal2" required>
                                            </div>
                                            <div class="form-group">
                                                <label>绩效3</label>
                                                <input class="form-control" type="text" value="0"
                                                       placeholder="请输入教师绩效" name="merits_sal3" required>
                                            </div>
                                            <div class="form-group">
                                                <label>绩效4</label>
                                                <input class="form-control" type="text" value="0"
                                                       placeholder="请输入教师绩效" name="merits_sal4" required>
                                            </div>
                                            <div class="form-group">
                                                <label>绩效5</label>
                                                <input class="form-control" type="text" value="0"
                                                       placeholder="请输入教师绩效" name="merits_sal5" required>
                                            </div>
                                            <h5 class="badge badge-pink">奖金部分</h5>
                                            <div class="form-group">
                                                <label>全勤奖</label>
                                                <input class="form-control" type="text" value="0"
                                                       placeholder="请输入教师全勤奖" name="full_time" required>
                                            </div>
                                            <div class="form-group">
                                                <label>安全奖</label>
                                                <input class="form-control" type="text" value="0"
                                                       placeholder="请输入教师安全" name="safe" required>
                                            </div>
                                            <div class="form-group">
                                                <label>教育教学</label>
                                                <input class="form-control" type="text" value="0"
                                                       placeholder="请输入教师教育教学" name="class_hour" required>
                                            </div>
                                            <div class="form-group">
                                                <label>班级新生补助</label>
                                                <input class="form-control" type="text" value="0"
                                                       placeholder="请输入新生补助" name="newstu" required>
                                            </div>
                                            <h5 class="badge badge-danger">扣减部分</h5>
                                            <div class="form-group">
                                                <label>请假</label>
                                                <input class="form-control" type="text" value="0"
                                                       placeholder="请输入请假天数" name="for_leave" required>
                                            </div>
                                            <div class="form-group">
                                                <label>其他</label>
                                                <input class="form-control" type="text" value="0"
                                                       placeholder="请输入其他数据" name="other" required>
                                            </div>
                                            <h5 class="badge badge-success">增加部分</h5>
                                            <div class="form-group">
                                                <label>补助加班</label>
                                                <input class="form-control" type="text" value="0"
                                                       placeholder="请输入加班补助" name="add_class" required>
                                            </div>
                                            <div class="form-group">
                                                <label>延点班代课</label>
                                                <input class="form-control" type="text" value="0"
                                                       placeholder="请输入延点班代课数据" name="class_out" required>
                                            </div>
                                            <h5 class="badge badge-dark">其他部分</h5>
                                            <div class="form-group">
                                                <label>班级人数</label>
                                                <input class="form-control" type="text" value="0"
                                                       placeholder="请输入班级人数" name="class_num" required>
                                            </div>
                                            <div class="form-group">
                                                <label>注册人数</label>
                                                <input class="form-control" type="text" value="0"
                                                       placeholder="请输入注册人数" name="class_reg" required>
                                            </div>
                                            <div class="form-group">
                                                <label>实际出勤(天数)</label>
                                                <input class="form-control" type="text" value="0"
                                                       placeholder="请输入实际出勤天数" name="sign_num" required>
                                            </div>
                                            <div class="form-group">
                                                <input type="submit" class="btn btn-success m-b-10 m-l-5"
                                                       value="确认添加">
                                                <a href="javascript:history.back()"
                                                   class="btn btn-warning m-b-10 m-l-5">返回</a>
                                            </div>
                                        </div>
                                        <div class="col-lg-6">
                                            <div class="form-group">
                                                <img src="/static/img/teacher.png" width="500"/>
                                            </div>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            Copyright &copy; 2024
        </div>
    </div>
</div>
<script src="/static/assets/js/lib/jquery.min.js"></script>
<script src="/static/assets/js/lib/jquery.nanoscroller.min.js"></script>
<script src="/static/assets/js/lib/sidebar.js"></script>
<script src="/static/assets/js/lib/bootstrap.min.js"></script>
<script src="/static/assets/js/lib/mmc-common.js"></script>
<script src="/static/assets/js/lib/mmc-chat.js"></script>
<script src="/static/assets/js/lib/chart-js/Chart.bundle.js"></script>
<script src="/static/assets/js/lib/chart-js/chartjs-init.js"></script>
<script src="/static/assets/js/lib/datamap/d3.min.js"></script>
<script src="/static/assets/js/lib/datamap/topojson.js"></script>
<script src="/static/assets/js/lib/datamap/datamaps.world.min.js"></script>
<script src="/static/assets/js/lib/datamap/datamap-init.js"></script>
<script src="/static/assets/lib/lobipanel/js/lobipanel.js"></script>
<script src="/static/assets/js/scripts.js"></script>
<script src="/static/js/H-ui.min.js"></script>
<script>
    $(document).ready(function () {
        $('#lobipanel-custom-control').lobiPanel({
            reload: false,
            close: false,
            editTitle: false
        });
        $('#datetimepicker').datetimepicker({
            language: 'zh-cn',
            format: 'yyyy-mm',
            autoclose: true,
            todayBtn: true,
            todayHighlight: true,
            startView: 'year',
            minView: 'year',
            maxView: 'year'
        });
    });

    $(function () {
        $("#addSalForm").submit(function (e) {
            e.preventDefault();

            const formData = $(this).serialize();

            $.ajax({
                url: "/api/v1/manager/ysal/add",
                type: "POST",
                data: formData,
                success: function (res) {
                    if (res.code === 0 || res.success === true) {
                        alert("添加成功！");
                        window.location.href = document.referrer;
                    } else {
                        alert("添加失败：" + res.msg);
                    }
                },
                error: function (xhr) {
                    alert("请求失败：" + xhr.status);
                }
            });
        });
    });
</script>
<style>
    .copyrights {
        text-indent: -9999px;
        height: 0;
        line-height: 0;
        font-size: 0;
        overflow: hidden;
    }
</style>
<div class="copyrights">
    <h3>&copy; 版权所有 | </h3>
</div>
</body>
</html>